package com.hpsk.shopsatoken.model.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hpsk.shopsatoken.model.user.dto.UserDto;
import com.hpsk.shopsatoken.model.user.vo.UserVo;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author huangwang
 * @since 2025-05-22
 */
@Getter
@Setter
@TableName("user")
@Schema(name = "User对象", description = "")
@NoArgsConstructor
@AllArgsConstructor
@Builder
@AutoMappers({
        @AutoMapper(target = UserDto.class),
        @AutoMapper(target = UserVo.class)
}
)
public class User implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description ="主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description ="姓名")
    @TableField("name")
    private String name;

    @Schema(description ="年龄")
    @TableField("age")
    private Integer age;

    @Schema(description ="邮箱")
    @TableField("email")
    private String email;

    @TableField("delete_flag")
    private String deleteFlag;

    @Schema(description ="创建用户")
    @TableField("create_user")
    private String createUser;

    @Schema(description ="创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description ="修改用户")
    @TableField("update_user")
    private String updateUser;

    @Schema(description ="修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @Schema(description ="手机号")
    @TableField("phone")
    private String phone;

    @Schema(description ="头像")
    @TableField("avatar")
    private String avatar;

    @Schema(description ="密码")
    private String password;
}
